﻿<!--#include virtual="/Common/Config.asp" -->
<!--#include virtual="/Common/conn.asp" -->
<!--#include virtual="/2010admin/Check_IsLogin.asp" -->
<!--#include virtual="/Common/Function.asp" -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="css/default.css" type="text/css" rel="stylesheet">
<title><%=web_title%></title>
<script language="javascript" src="js/main.js"></script>
<script language="javascript" src="js/sdmenu.js"></script>
</head>
<body>
<table cellSpacing="0" cellPadding="0" width="100%" align="left" border="0" class="table_left">
  <tr>
    <td valign="top">
      <div class="tablel_top">
        <span><a href="/index.asp" target="_bank"><b>网站首页</b></a><a href="admin_main.asp" target="_top"><b>管理首页</b></a><a href="index.asp?action=logout" target="_top"><b>退出管理</b></a></span>
      </div>
      <script type="text/javascript">
	// <![CDATA[
	var myMenu;
	window.onload = function() {
		myMenu = new SDMenu("my_menu");
		myMenu.init();
		myMenu.oneSmOnly = true; 
	};
	// ]]>
	</script>
    
    <div id="my_menu" class="sdmenu">
    <%
		If Is_Admin=True Then 
			sql = " SELECT DISTINCT MenuID,MenuName,Menu_Order FROM Admin_Menu  WHERE MenuVisibled='1' AND ParentID=0  ORDER BY Menu_Order ASC "
		Else
			sql = " SELECT DISTINCT MenuID,MenuName,Menu_Order FROM uvw_Menu_Priv  WHERE MenuVisibled='1' AND ParentID=0 And Admin_UserID = "&Session("Admin_UserId") & " ORDER BY Menu_Order ASC "
		End If

		'writebr sql
		Set rs = conn.execute(sql)
		Do While Not rs.Eof 
	 %>
    
      <div>
        <span><%=rs(1)%></span>
        
        <%

				If Is_Admin=True Then 
					sql2 = " SELECT DISTINCT MenuID,MenuName,MenuPath,Menu_Order FROM Admin_Menu  WHERE MenuVisibled='1' AND ParentID= "&rs(0) & " ORDER BY Menu_Order ASC "
				Else

					sql2 = " SELECT DISTINCT MenuID,MenuName,MenuPath,Menu_Order FROM  uvw_Menu_Priv WHERE MenuVisibled='1' AND ParentID= "&rs(0) & " AND  Admin_UserID = "&Session("Admin_UserId") & " ORDER BY Menu_Order ASC "

				End If

				Set rs2 = conn.execute(sql2)
				
				
				If rs2.Eof Then
					Response.write "&nbsp;"
				Else

				%>
        
        <%
					Do While Not rs2.Eof 

					%>
                    <a href="<%=rs2(2)%>" target="main"><%=rs2(1)%></a>
					<%
					rs2.movenext
					Loop
					%>
                    
                    
                    <%
				  End If
				  rs2.close
				  %>
      </div>

    <%
	rs.movenext
	Loop
	rs.close
	%>
    </div>
      

      
    </td>
  </tr>
</table>
</body>

</html>
<%
Call Conn_Close()
%>
